package com.smartmedical.patient.sickcricle.controller;

import com.smartmedical.common.core.domain.HealthR;
import com.smartmedical.patient.sickcricle.service.SickCircleVerifyService;
import com.smartmedical.patient.sickcricle.vo.MySickCircleCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.health.Health;
import org.springframework.web.bind.annotation.*;

import java.util.List;

import static com.smartmedical.common.core.utils.PageUtils.startPage;

@RestController
@RequestMapping("/user/verify/v1")
public class SickCircleVerifyController {

    @Autowired
    private SickCircleVerifyService sickCircleVerifyService;

    /**
     * 查询用户收藏病友圈列表
     */
    @GetMapping("/findUserSickCollectionList")
    public HealthR<List<MySickCircleCollection>> findUserSickCollectionList(@RequestHeader(value = "userId",required = false) Integer userId,
                                                                            @RequestHeader(value = "Sessionid",required = false) String sessionId,
                                                                            @RequestParam Integer page,
                                                                            @RequestParam Integer count) {
        //分页
        startPage(page, count);

        return sickCircleVerifyService.findUserSickCollectionList();

    }

}
